package net.suncaper.psychological.model.domain;

import java.util.Date;

/**
 * 时间配置领域模型
 * 用于管理工作时间段和访问间隔时间设置
 */
public class TimeConfig {
    private Long id;
    private String configType;  // 配置类型：WORKING_HOURS（工作时间）, INTERVAL（间隔时间）
    private String name;        // 配置名称
    private String startTime;   // 开始时间（格式：HH:mm）
    private String endTime;     // 结束时间（格式：HH:mm）
    private Integer intervalMinutes;  // 间隔时间（分钟）
    private Integer duration;   // 持续时间（分钟）
    private String days;        // 工作日（1-7，逗号分隔）
    private String description; // 描述
    private Boolean isActive;   // 是否启用
    private Date createdTime;   // 创建时间
    private Date updatedTime;   // 更新时间

    // 构造函数
    public TimeConfig() {}

    public TimeConfig(String configType, String name, String startTime, String endTime, 
                     Integer intervalMinutes, Integer duration, String days, String description, Boolean isActive) {
        this.configType = configType;
        this.name = name;
        this.startTime = startTime;
        this.endTime = endTime;
        this.intervalMinutes = intervalMinutes;
        this.duration = duration;
        this.days = days;
        this.description = description;
        this.isActive = isActive;
        this.createdTime = new Date();
        this.updatedTime = new Date();
    }

    // Getter和Setter方法
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getConfigType() {
        return configType;
    }

    public void setConfigType(String configType) {
        this.configType = configType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public Integer getIntervalMinutes() {
        return intervalMinutes;
    }

    public void setIntervalMinutes(Integer intervalMinutes) {
        this.intervalMinutes = intervalMinutes;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getDays() {
        return days;
    }

    public void setDays(String days) {
        this.days = days;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getIsActive() {
        return isActive;
    }

    public void setIsActive(Boolean isActive) {
        this.isActive = isActive;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
    }

    @Override
    public String toString() {
        return "TimeConfig{" +
                "id=" + id +
                ", configType='" + configType + '\'' +
                ", name='" + name + '\'' +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", intervalMinutes=" + intervalMinutes +
                ", duration=" + duration +
                ", days='" + days + '\'' +
                ", description='" + description + '\'' +
                ", isActive=" + isActive +
                ", createdTime=" + createdTime +
                ", updatedTime=" + updatedTime +
                '}';
    }
} 